package com.nervenets.template.controller.user.params;

import com.nervenets.general.Global;
import com.nervenets.general.web.params.Params;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.SuperBuilder;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@SuperBuilder
public class BindMobileParams implements Params {
    @ApiModelProperty(value = "手机号码", required = true)
    @NotBlank
    @Pattern(regexp = Global.RegExp.MOBILE, message = "请输入正确的手机号码")
    private String mobile;
    @ApiModelProperty(value = "验证码", required = true)
    @Min(value = 100000, message = "请输入六位数字验证码")
    @Max(value = 999999, message = "请输入六位数字验证码")
    private int validationCode;
}
